package com.shunli.cterminal.enums;

import com.examples.core.enums.BaseEnum;
import com.examples.core.enums.EnumOperations;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @className: OrderMallEnum
 * @description: TODO
 * @author: DAIYALU
 * @date: 2024/9/28
 * @version: 1.0
 */
@Getter
@AllArgsConstructor
public enum OrderMallEnum implements BaseEnum<String> {

    AD("ad","投放商城",OrderCategoryEnum.ONLINE),
    SMS_EMAIL("sms_email","短邮商城",OrderCategoryEnum.ONLINE),
    YQC("yqc","易启创商城",OrderCategoryEnum.SALE),
    SALE("sale","销售商城",OrderCategoryEnum.SALE);

    private String code;

    private String desc;

    private OrderCategoryEnum orderCategoryEnum;

    public static OrderMallEnum ofCodeNoisy(String code) {
        return EnumOperations.getByCodeNoisy(OrderMallEnum.class, code);
    }

    /**
     * 通过code查询
     *
     * @param code code
     * @return OrderMallEnum
     */
    public static OrderMallEnum ofCode(String code) {
        return EnumOperations.getByCode(OrderMallEnum.class, code);
    }
}
